﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MedicWeb.forms;
using MedicWeb.MedicService;

namespace MedicWeb.Handlers {
    public class DeleteHelper : SessionPage, IHttpHandler {
        
        public new void ProcessRequest(HttpContext context) {
            string type = context.Request.QueryString["class"];
            context.Response.ContentType = "text/plain";

            var ms = new MainService();
            var session = GetSession();
            
            int[] ids = ms.GetDeletedByClass(GetSession(), type);
            string s = string.Join(",", ids);
            
            context.Response.Write(s);
            context.Response.Flush();
            context.Response.End();
        }

        public bool IsReusable {
            get { return true; }
        }
        
    }
}
